<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>考勤管理</title>

  <link rel="stylesheet" href="../../../static/layui/dist/layuiadmin/layui/css/layui.css">
  <script src="../../../static/layui/dist/layuiadmin/layui/layui.all.js"></script>

</head>

<body>


  <div class="layui-col-md12">
    <div class="layui-card">

      <div class="layui-card-body">
        <button class="layui-btn">员工考勤签到</button>
        <button class="layui-btn" onclick="one(this)" >上班打卡</button>
      
        <button class="layui-btn" onclick="threeFn(this)" >下班打卡</button>
        <a href="/attendance/look"><button class="layui-btn">查看考勤记录</button></a>
      </div>


      <div class="layui-bg-gray">
        <div class="layui-row layui-col-space15">
          <div class="layui-col-md6">
            <div class="layui-card">
              <div class="layui-card-header">上班打卡统计</div>
              <div class="layui-card-body">
                <table class="layui-hide" id="LAY_table_user" lay-filter="useruv"></table>
              </div>
            </div>
          </div>
          <div class="layui-col-md6">
            <div class="layui-card">
              <div class="layui-card-header">下班打卡统计</div>
              <div class="layui-card-body">
                <table class="layui-hide" id="LAY_table_user1" lay-filter="useruv1"></table>
              </div>
            </div>

            <script src="../../../static/js/qiandaotb.js"> </script>
            <script src="../../../static/js/qiandaotb1.js"></script>>

            <script src="/static/js/jquery-1.11.3.js"></script>
            <script type="text/html" id="barDemo">
        <a class="layui-btn layui-btn-mini" lay-event="detail">查看</a>
        <a class="layui-btn layui-btn-mini" lay-event="edit">编辑</a>
        <a class="layui-btn layui-btn-danger layui-btn-mini" lay-event="del">删除</a>
    </script>

  <script>
  let backStatus = true
  function one(e) {
      $.ajax({
        type: 'get',
        url: '/attendance/chock',
        success: function (res) {
          alert(res.data);
          if (backStatus) {
      backStatus = !backStatus
      e.style.background = "grey"
        }}
        })
        }
      
</script>
<!-- <script>
  let backStatus = true
  function one1(e) {
    if (backStatus) {
      backStatus = !backStatus
      e.style.background = "grey"
    }
  }
</script> -->
<script>
  layui.use(['table', 'layedit', 'laydate'], function () {
    var table = layui.table
      , $ = layui.jquery;


        })
</script>
<!-- <script>
let backStatus_one = true
function threeFn(e) {
      if(backStatus_one) {
        backStatus_one = !backStatus_one
        e.style.background = "grey"
      }
    }
  </script> -->
<script>
      let backStatus_one = true
       function threeFn(e) {
      $.ajax({
        type: 'get',
        url: '/attendance/sign',
        success: function (res) {
          alert(res.data);
          if(backStatus_one) {
        backStatus_one = !backStatus_one
        e.style.background = "grey"
      }
        }
        })
        }

</script>
</body>

</html>